//
//  Auction_SpecialSaleDetailsHongKongPrice_Cell_WX.m
//  ZITHER
//
//  Created by weixin on 2019/6/3.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Auction_SpecialSaleDetailsHongKongPrice_Cell_WX.h"

@implementation Auction_SpecialSaleDetailsHongKongPrice_Cell_WX

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [self setUI];
}

-(void)setModel:(specialSaleSceneidDetails *)model{
    _model = model;
    self.titleLab.text = model.title;
    self.PriceLab.text = [NSString stringWithFormat:@"店铺售价 ¥%ld",model.priceBiz];
    self.officialPriceLab.text = [NSString stringWithFormat:@"大陆公价 ¥%ld",model.priceOfficial];

    
    
//    @property (nonatomic,strong)BaseLab * PriceLab;
//    @property (nonatomic,strong)BaseLab * PriceremindedLab;
//
//    @property (nonatomic,strong)BaseLab * officialPriceLab;
//    @property (nonatomic,strong)BaseBtn * parameterBtn;
}

-(void)setUI{
    [self.titleLabType mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(15);
        make.left.equalTo(self).offset(15);
        make.width.mas_equalTo(40);
    }];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.titleLabType.mas_right).offset(15);
        make.right.equalTo(self).offset(-15);
        make.centerY.equalTo(self.titleLabType).offset(0);
    }];
    
    [self.PriceLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(15);
        make.right.equalTo(self).offset(-15);
        make.top.equalTo(self.titleLabType.mas_bottom).offset(12);
        make.height.mas_equalTo(16);
    }];
    
    [self.PriceremindedLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(13);
        make.top.equalTo(self.PriceLab.mas_bottom).offset(5);
        make.height.mas_equalTo(15);
        make.width.mas_equalTo(230);
    }];
    
    [self.officialPriceLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(15);
        make.top.equalTo(self.PriceremindedLab.mas_bottom).offset(15);
        make.height.mas_equalTo(16);
        make.bottom.equalTo(self.mas_bottom).offset(0);
    }];
    
    [self.parameterBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).offset(-15);
        make.top.equalTo(self.PriceremindedLab.mas_bottom).offset(15);
        make.height.mas_equalTo(15);
    }];
    

    
    
}


/**
 @property (nonatomic,strong)BaseLab * ;
 @property (nonatomic,strong)BaseLab * titleLab;
 
 @property (nonatomic,strong)BaseLab * PriceLab;
 @property (nonatomic,strong)BaseLab * PriceremindedLab;
 
 @property (nonatomic,strong)BaseLab * officialPriceLab;
 @property (nonatomic,strong)BaseBtn * parameterBtn;
 
 */

-(BaseLab *)titleLab{
    if (!_titleLab) {
        _titleLab = [BaseLab initCustomLab:@"介绍介绍介绍123sdq" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFangSC-Semibold" size:15.f]];
        _titleLab.backgroundColor = [UIColor clearColor];
        
        [self addSubview:_titleLab];
    }
    return _titleLab;
}

-(BaseLab *)titleLabType{
    if (!_titleLabType) {
        _titleLabType = [BaseLab initCustomLab:@"全新" color:[UIColor whiteColor] font:[UIFont fontWithName:@"PingFang-SC-Regular" size:12]];
        _titleLabType.textAlignment = NSTextAlignmentCenter;
        [_titleLabType setCornerRadiusWithRadius:2 isMasks:YES];
        _titleLabType.backgroundColor = HexColor(0xff6f6f);
        [self addSubview:_titleLabType];
        
    }
    return _titleLabType;
}

-(BaseLab *)PriceLab{
    if (!_PriceLab) {
        _PriceLab = [BaseLab initCustomLab:@"店铺售价 $123123" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFangSC-Medium" size:15]];
        _PriceLab.backgroundColor = [UIColor clearColor];
        [self addSubview:_PriceLab];
        
    }
    return _PriceLab;
}
-(BaseLab *)PriceremindedLab{
    if (!_PriceremindedLab) {
        _PriceremindedLab = [BaseLab initCustomLab:@"以当前港币汇率0.87换算，可能有波动" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFang-SC-Regular" size:12]];
        _PriceremindedLab.backgroundColor = HexColor(0xf5f5f5);
        _PriceremindedLab.textAlignment = NSTextAlignmentCenter;
        [_PriceremindedLab setCornerRadiusWithRadius:2 isMasks:YES];
        [self addSubview:_PriceremindedLab];
        
    }
    return _PriceremindedLab;
}


-(BaseLab *)officialPriceLab{
    if (!_officialPriceLab) {
        _officialPriceLab = [BaseLab initCustomLab:@"大陆公价 ¥990,000" color:HexColor(0xff6f6f) font:[UIFont fontWithName:@"PingFangSC-Medium" size:15]];
        _officialPriceLab.backgroundColor = [UIColor clearColor];
        [self addSubview:_officialPriceLab];
    }
    return _officialPriceLab;
}

-(BaseBtn *)parameterBtn{
    if (!_parameterBtn) {
        _parameterBtn = [BaseBtn initCustomBtnImageAndTitles:@[@"表款参数行情 >"] images:@[] color:@[baseColorTheme]];
        _parameterBtn.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:14];
        _parameterBtn.backgroundColor = [UIColor clearColor];

        [[_parameterBtn addTag]subscribeNext:^(id  _Nullable x) {
            
        }];
        [self addSubview:_parameterBtn];

    }
    return _parameterBtn;
}


@end
